package com.example.demo.controller;

import com.example.demo.entity.User;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with LXD
 *
 * @author:Luhui
 * @qq:729913162
 * @Date:2018-07-22
 * @Time:23:49
 */
@RestController
public class Hello2Controller {
    @Autowired
    private UserService userService;

    @RequestMapping("/findOne")
    public User findOne(int id){
        return userService.findOne(id);
    }
}
